package com.ebocy.hammer.battle.s2s.handler;

import org.apache.mina.core.session.IoSession;

import com.ebocy.hammer.battle.s2s.service.ClientBattleService;
import com.ebocy.hammer.core.constants.ServerMessage;
import com.ebocy.hammer.core.handler.IMessageHandler;
import com.ebocy.hammer.core.message.IMessage;
/**
 * @author lichunmei
 * @date May 16, 2012 10:20:53 AM
 */
public class ClientBattleHandler implements IMessageHandler {
	private static short[] messageCodes = { ServerMessage.D2B_ACK_LOGIN_DATA,
		ServerMessage.D2B_ACK_UPDATE_PLAYER
	};

	private ClientBattleHandler() {
	}

	private static ClientBattleHandler clientHandler = null;

	public static ClientBattleHandler getInstance() {
		if (clientHandler == null)
			clientHandler = new ClientBattleHandler();
		return clientHandler;
	}

	@Override
	public short[] getMessageCodes() {
		// TODO Auto-generated method stub
		return messageCodes;
	}

	@Override
	public void resolve(IMessage message, IoSession ioSession) {

		switch( message.getMessageCode() ){
			case ServerMessage.D2B_ACK_LOGIN_DATA:
				break;
			case ServerMessage.D2B_ACK_UPDATE_PLAYER:

				break;
			}
	}
	ClientBattleService service = ClientBattleService.getInstance();
}
